package com.example.pattern.chain;

/**
 * 具体处理器类 - 级别2处理器
 *
 * @author FM_南风
 * @date 2024/7/5
 */
public class ConcreteHandler2 extends Handler {
    public void handleRequest(Request request) {
        if (request.getLevel() <= 2) {
            System.out.println("ConcreteHandler2 处理请求");
        } else if (successor != null) {
            successor.handleRequest(request);
        }
    }
}
